Rem
Helper module for mscchat client and server, part of mscchat

Copyright (c) 2009 Michael Schaefer and Immo-Gert Birn

Mscchat is free software: you can redistribute it And/Or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, Or
(at your option) any later version.

Mscchat is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY Or FITNESS For A PARTICULAR PURPOSE.  See the
GNU General Public License For more details.

You should have received a copy of the GNU General Public License
along with mscchat.  If Not, see <http://www.gnu.org/licenses/>.
EndRem

Function getStatusString:String(remoteObj:TGNetObject)
  Local status:String
  Select GNetObjectState(remoteObj)
    Case GNET_MODIFIED
      status = "GNET_MODIFIED"
    Case GNET_CREATED
      status = "GNET_CREATED"
    Case GNET_CLOSED
      status = "GNET_CLOSED"
    Case GNET_SYNCED
      status = "GNET_SYNCED"
    Case GNET_ZOMBIE
      status = "GNET_ZOMBIE"
  EndSelect
  Return status
EndFunction

Function getSlotName:String(slot:Int)
  Local slotname:String
  Select slot
    Case c_slot_name
      slotname = "Name"
    Case c_slot_raum
      slotname = "Raum"
    Case c_slot_text
      slotname = "Test"
    Case c_slot_befehl
      slotname = "Befehl"
    Case c_slot_rang
      slotname = "Rang" 
    Case c_slot_to_name
      slotname = "An"
    Case c_slot_antwort
      slotname = "Antwort"
  EndSelect
  Return slotname
EndFunction

Function getRangName:String(rang:Int)
  Local rangname:String
  Select rang
    Case c_rang_admin
      rangname = "Admin"
    Case c_rang_moderator
      rangname = "Moderator"
    Case c_rang_gast
      rangname = "Gast"
  EndSelect
  Return rangname
EndFunction